package com.example.tests;

public class ContactData implements Comparable<ContactData> {
	private String id;
	private String firstname;
	private String lastname;
	private String address;
	private String homePhone;
	private String mobilePhone;
	private String workPhone;
	private String email;
	private String email2;
	private String bday;
	private String bmonth;
	private String byear;
	private String group;
	private String secondaryAddress;
	private String secondaryPhone;
	
	public ContactData() {
		
	}
	
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
//		result = prime * result
//				+ ((lastname == null) ? 0 : lastname.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (lastname == null) {
			if (other.lastname != null)
				return false;
		} else if (!lastname.equals(other.lastname))
			return false;
		return true;
	}

	@Override
	public int compareTo(ContactData other) {
		return this.lastname.toLowerCase().compareTo(other.lastname.toLowerCase());
	}



	public String getFirstname() {
		return firstname;
	}



	public ContactData withFirstname(String firstname) {
		this.firstname = firstname;
		return this;
	}



	public String getLastname() {
		return lastname;
	}



	public ContactData withLastname(String lastname) {
		this.lastname = lastname;
		return this;
	}



	public String getAddress() {
		return address;
	}



	public ContactData withAddress(String address) {
		this.address = address;
		return this;
	}



	public String getHomePhone() {
		return homePhone;
	}



	public ContactData withHomePhone(String homePhone) {
		this.homePhone = homePhone;
		return this;
	}



	public String getMobilePhone() {
		return mobilePhone;
	}



	public ContactData withMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
		return this;
	}



	public String getWorkPhone() {
		return workPhone;
	}



	public ContactData withWorkPhone(String workPhone) {
		this.workPhone = workPhone;
		return this;
	}



	public String getEmail() {
		return email;
	}



	public ContactData withEmail(String email) {
		this.email = email;
		return this;
	}



	public String getEmail2() {
		return email2;
	}



	public ContactData withEmail2(String email2) {
		this.email2 = email2;
		return this;
	}



	public String getBday() {
		return bday;
	}



	public ContactData withBday(String bday) {
		this.bday = bday;
		return this;
	}



	public String getBmonth() {
		return bmonth;
	}



	public ContactData withBmonth(String bmonth) {
		this.bmonth = bmonth;
		return this;
	}



	public String getByear() {
		return byear;
	}



	public ContactData withByear(String byear) {
		this.byear = byear;
		return this;
	}



	public String getGroup() {
		return group;
	}



	public ContactData withGroup(String group) {
		this.group = group;
		return this;
	}



	public String getSecondaryAddress() {
		return secondaryAddress;
	}



	public ContactData withSecondaryAddress(String secondaryAddress) {
		this.secondaryAddress = secondaryAddress;
		return this;
	}



	public String getSecondaryPhone() {
		return secondaryPhone;
	}



	public ContactData withSecondaryPhone(String secondaryPhone) {
		this.secondaryPhone = secondaryPhone;
		return this;
	}



	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}



	public void setLastname(String lastname) {
		this.lastname = lastname;
	}



	public void setAddress(String address) {
		this.address = address;
	}



	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}



	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}



	public void setWorkPhone(String workPhone) {
		this.workPhone = workPhone;
	}



	public void setEmail(String email) {
		this.email = email;
	}



	public void setEmail2(String email2) {
		this.email2 = email2;
	}



	public void setBday(String bday) {
		this.bday = bday;
	}



	public void setBmonth(String bmonth) {
		this.bmonth = bmonth;
	}



	public void setByear(String byear) {
		this.byear = byear;
	}



	public void setGroup(String group) {
		this.group = group;
	}



	public void setSecondaryAddress(String secondaryAddress) {
		this.secondaryAddress = secondaryAddress;
	}



	public void setSecondaryPhone(String secondaryPhone) {
		this.secondaryPhone = secondaryPhone;
	}



	public String getId() {
		return id;
	}



	public void setId(String id) {
		this.id = id;
	}
	
}